home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
cancelbt
/
mainform.frm
< prev
next >
Wrap
Text File
|
1995-09-06
|
2KB
|
69 lines
VERSION 2.00
Begin Form MainForm
Caption = "Main Process Form"
ClientHeight = 3720
ClientLeft = 1980
ClientTop = 1755
ClientWidth = 5460
Height = 4125
Left = 1920
LinkTopic = "Form1"
ScaleHeight = 3720
ScaleWidth = 5460
Top = 1410
Width = 5580
Begin TextBox Text1
BorderStyle = 0 'None
Height = 315
Left = 2220
TabIndex = 2
Top = 2760
Width = 2055
End
Begin CommandButton Command1
Caption = "Begin Long Process"
Height = 675
Left = 1560
TabIndex = 0
Top = 1560
Width = 2295
End
Begin Label Label1
Alignment = 1 'Right Justify
Caption = "Status:"
Height = 255
Left = 1080
TabIndex = 1
Top = 2760
Width = 1035
End
End
Sub Command1_Click ()
Dim x%, Counter&
Text1.Tag = ""
Text1.Text = "Running..."
CanDialog.Show
Counter = 0
Do While Counter < 15000 And Text1.Tag = ""
x% = DoEvents()
Counter = Counter + 1
Loop
Unload CanDialog
Beep
If Text1.Tag = "" Then
Text1.Text = "Completed."
MsgBox "Process Completed."
Else
Text1.Text = "Cancelled..."
MsgBox "Process Cancelled!"
End If
End Sub